<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%@ taglib uri="/sinopac-fn" prefix="fn" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="/sinopac/js/jQuery/jquery-1.8.2.min.js"></script>
<script type="text/javascript" src="/sinopac/js/jQuery/jquery_DOMWindow.js"></script>
<script type="text/javascript" src="/sinopac/js/tools/formUtil.js"></script>
<script>

	function printScreen(printlist)
    {
	    var value = printlist.innerHTML;
	    var printPage = window.open("","printPage","");
	    printPage.document.open();
	    printPage.document.write("<HTML><head></head><BODY onload='window.print();window.close()'>");
	    printPage.document.write("<PRE>");
	    printPage.document.write(value);
	    printPage.document.write("</PRE>");
	    printPage.document.close("</BODY></HTML>");
    }
	$(document).ready(function(){
		$('input[name=btnPrint]').click(function(){
			var f = $('#form2');
			f.prop('action',"${fn:url('/Index/backMain.action')}");
			f.submit();
		});
		$('input[name=cancelPrint]').click(function(){
			var f = $('#form2');
			f.prop('action',"${fn:url('/Index/backMain.action')}");
			f.submit();
		});
		if($('tr').size()==0){
			var f = $('#form2');
			f.prop('action',"${fn:url('/Index/backMain.action')}");
			f.submit();
		}
	});
</script>
<title>列印報表</title>
</head>
<body>
<!--	<img src="../form/images/demoReport.png"/> -->
<div id="printlist">
<s:iterator value="reportList">
<div style="width: 210mm;">
<table align="right">
	<tr align="right">
		<td align="right"><font size="5"><b>地址：香港九龍尖沙咀北京道1號18樓    永豐銀行</b></font></td>
	</tr>	
	<tr align="right">
		<td align="right"><font size="5"><b>FAX(852)2907-6968</b></font></td>
	</tr>
	<tr align="right"><td><font size="5"><b>───────────────────────────────</b></font></td></tr>
</table>

	<table>
		<tr height = "180"/>
		<s:iterator value="customerList" status="c" var="cus">
			<tr><td><font size="5"><b><s:property value="customer_name"/><br>
									  <s:property value="customer_address"/><br>
									  <s:property value="customer_contact"/></b></font></td></tr>				
		</s:iterator>
		<tr height = "100"/>		
	</table>	
	<font size="5"><b>親愛的客戶 您好，</b></font><br>
	<font size="5"><b>有關 貴客戶於本行申請動態密碼載具帳戶資料明細如下：</b></font>
	<table>
			<tr height = "10"/>
			<tr>
				<td><font size="5"><b>Token ID</b></font></td>
				<td width="30" />
			    <td><font size="5"><b><s:property value="token_esn"/></b></font></td>
			</tr>
			<tr height = "10"/>
		<s:iterator value="customerList" status="c" var="cus">  
			<tr>
				<td><font size="5"><b>客戶 ID</b></font></td>
				<td width="30" />
			    <td><font size="5"><b><s:property value="customer_demo_id"/></b></font></td>
			</tr>
		</s:iterator>
			<tr height = "10"/>		
			<tr>
				<td><font size="5"><b>客戶綁定 ID</b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[0].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[1].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[2].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[3].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[4].customer_demo_id"/></b></font></td>
				<!-- 
				<s:iterator value="GroupList" status="c" var="cus">
				    <td><font size="5"><b><s:property value="customer_demo_id"/></b></font></td>
				    <td width="20" />
			    </s:iterator>
			    -->
			</tr>
			<tr>
				<td width="150" />
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[5].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[6].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[7].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[8].customer_demo_id"/></b></font></td>
				<td width="20" />
				<td><font size="5"><b><s:property value="groupList[9].customer_demo_id"/></b></font></td>
			</tr>
			<tr height = "10"/>
			<!-- 		
			<tr>
				<td><font size="5"><b>接獲申請日期</b></font></td>
				<td width="30" />
				<td><font size="5"><b><s:property value="subdate"/></b></font></td>
			</tr>
			 -->					
	</table>
	<p>-----------------------------------------------------------------------------------------------------------------------------------------------</p>
	<table>
		<tr align="center">
				<td><U><font size="5"><b>動 態 密 碼 載 具 簽 收 回 函</b></font></U></td>
		</tr>
		<tr align="center">
				<td><font size="5"><b>ONE TIME PASSWORD TOKEN RECEIPT</b></font></td>
		</tr>
		<tr height = "30"/>		
		<tr><td><font size="4.5"><b>本公司/本人已於______年_____月_____日接獲  貴行「動態密碼載具」並確認前開「動態密碼載具」外觀無損，惠請  貴行</b></font></td></tr>
		<tr height = "10"/>
	    <tr><td><font size="4.5"><b>於確認簽章字樣無誤後，開啟本公司/本人動態密碼載具驗證傳真指示密碼之機制，特此證明。</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>The Company has / I have received the One Time Password Token ("Token") on _________________________ (the date) issued by</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>Bank SinoPac Hong Kong Branch ("Bank") and confirmed the said Token is undamaged.The company/I hereby authorize the Bank</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>to activate the Token as the authentication measure for fax instruction after the Bank verifies the Signature of this receipt.</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>此致</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>This Receipt is made to</b></font></td></tr>
		<tr height = "40"/>
		<tr><td><font size="4.5"><b>永豐商業銀行股份有限公司香港分行</b></font></td></tr>
		<tr height = "10"/>
		<tr><td><font size="4.5"><b>Bank SinoPac Hong Kong Branch</b></font></td></tr>
		<tr height = "10"/>
		<tr align="right"><td><font size="4.5"><b>_____________________________________________________________</b></font></td></tr>
		<tr align="right"><td><font size="4.5"><b>個人戶親簽/公司戶請蓋留存印鑑 Authorized Signature (and chop if any)</b></font></td></tr>
		<tr height="20"/>
		<tr align="left"><td><font size="4.5"><b>請將本函寄回/傳真至本分行</b></font></td></tr>				
	</table>
	</div>
	</s:iterator>
	</div>
<s:form id="form2">
	<table width="60%">
		<tr height="100"/>
		<tr align="center">
			<td><input type="button" name="btnPrint" value="列印" onclick="printScreen(printlist)"></td>
			<td><input type="button" name="cancelPrint" value="取消"></td>
		</tr>
		<tr>
			<td><input type="hidden" name="subdate" value="${ reportList[0].subdate }"></td>
		</tr>
	</table>
</s:form>
</body>
</html>